//
//  ACPureTransitionDemoAViewController.m
//  ACFramework_Example
//
//  Created by caoyq on 2020/9/30.
//  Copyright © 2020 honeycao. All rights reserved.
//

#import "ACPureTransitionDemoAViewController.h"
#import "NextViewController.h"

@interface ACPureTransitionDemoAViewController ()

@end

@implementation ACPureTransitionDemoAViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = [@(self.navigationController.viewControllers.count) stringValue];
    
    self.navigationController.navigationBar.barTintColor = [UIColor redColor];
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 0, 100, 60);
    btn.center = self.view.center;
    [btn setTitle:@"push" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(handleClickButton) forControlEvents:UIControlEventTouchUpInside];
    btn.backgroundColor = [UIColor blueColor];
    [self.view addSubview:btn];
}

- (void)handleClickButton {
    NextViewController *next = [NextViewController new];
    next.clickBlock = ^{
        self.title = @"标题被修改";
    };
    [self.navigationController pushViewController:next animated:YES];
}

@end
